% Zhejiang University Graduation Thesis/Design Template
% Author     : Zixuan Wang
% Email      : zxwang42 [at] gmail.com
% Update     : https://github.com/TheNetAdmin/zjuthesis/releases
% Discussion : https://github.com/TheNetAdmin/zjuthesis/discussions
% Documents  : https://thenetadmin.github.io/zjuthesis

% If you have trouble using this template, please:
%   1. First go through the online documentations mentioned above, to see if 
%      there're already solutions.
%   2. Go through GitHub Issue list, to see if there're discussions on similar
%      problems
%   3. Open a GitHub Issue to discuss with developers
%   4. If you don't know how to use GitHub, you can send me an email

\documentclass[
    % Debugging Settings
    PrintFilePath   = false,            % print tex file path for each page
    % Layout Settings
    TwoSide         = false,             % set to false if don't need empty pages
    % Thesis Info
    StudentName     = 柳湛宇,
    StudentID       = 22221226,
    AdvisorName     = 王新宇,
    Grade           = 2022,            % only the year, no '级'
    Major           = 软件工程,
    Department      = 计算机科学与技术学院,
    SubmitDate      = 2025年2月17日,
    MajorFormat     = cs,
    Degree          = graduate,   % 'undergraduate' or 'graduate'
    Type            = thesis,          % 'thesis'   or 'design'
    Period          = final,           % 'proposal' or 'paper' or 'final'
    BlindReview     = false,           % 'false'    or 'true'
    Language        = chinese,         % 'chinese'  or 'english'
    % Graduate Thesis Info
    GradLevel       = master,          % 'master' or 'doctor'
    Topic           = 图机器学习,
    ColaboratorName = ,
    % Table of Contents
    ListOfContents  = true,
    ListOfFigures   = true,
    ListOfTables    = true,
    ListOfAlgorithms= false,
    % Title
    Title           = {{基于序列预测模型的社交网络传播源检测方法}},
    TitleEng        = {{A Source Detection Method in Social Network Based on Sequence Prediction Model}}
]{zjuthesis}

%% Uncomment the following lines if you need multi line titles on cover pages
\titletwolines{基于序列预测模型的}{社交网络传播源检测方法}
\titleengthreelines{A Source Detection Method}{in Social Network Based on}{Sequence Prediction Model}

%% Uncomment the following lines if you need multi line major names on cover pages
% \majortwolines{专业名第一行}{专业名第二行}

%% Uncomment the following lines if you need multi line department names on cover pages
% \departmenttwolines{学院名第一行}{学院名第二行}

\newcommand{\inputundergraduate}
{
    \ifthenelse{\equal{\Period}{final}}
    {
        % Final thesis
        % Final part
        \newcommand{\undergradcurrstage}{final}
        \newrefsection
        
        \coverstyle
        \inputpage{final}{cover}

        \prevstyle
        \inputpage{final}{previous}
        \inputpage{final}{toc}

        \bodystyle
        \inputpage{final}{cover-part}

        \resetpagecounter{}
        \inputbody{final/content}
        \inputbody{final/post}

        \poststyle
        \inputpage{final}{post}

        % Proposal part
        \renewcommand{\undergradcurrstage}{proposal}
        \newrefsection

        \coverstyle
        \inputpage{proposal}{cover-part}
        \inputpage{proposal}{cover}
        \inputpage{proposal}{previous}
        
        \bodystyle
        \inputbody{proposal/content}

        \poststyle
        \inputpage{proposal}{post}
    }

    \ifthenelse{\equal{\Period}{proposal}}
    {
        % Thesis proposal
        \newcommand{\undergradcurrstage}{proposal}

        \coverstyle
        \inputpage{proposal}{cover}
    
        % 'proposal' previous part uses 'empty' page style,
        % as shown in cs undergrad template.
        \inputpage{proposal}{previous}
        
        \prevstyle
        \inputpage{proposal}{toc}
    
        \bodystyle
        \inputbody{proposal/content}
        
        \poststyle
        \inputpage{proposal}{post}
    }

    \ifthenelse{\equal{\Period}{paper}}
    {
        % paper only part
        \newcommand{\undergradcurrstage}{paper}
        \newrefsection
        
        \coverstyle
        \inputpage{final}{cover}

        \prevstyle
        \inputpage{final}{previous}
        \inputpage{final}{toc}

        \bodystyle
        \inputpage{final}{cover-part}
        \cleardoublepage
        
        \inputbody{final/content}
        \inputbody{final/post}

        \poststyle
        \inputpage{final}{post}
    }
}

\newcommand{\inputgraduate}
{
    \coverstyle
    \inputpage{cover}

    \prevstyle
    \inputpage{previous}
    \inputpage{toc}
    
    % Main contents
    \bodystyle
    \inputbody{content}

    % Post part
    \poststyle
    \inputbody{post}
}

\begin{document}



\ifthenelse{\equal{\Degree}{undergraduate}}
{
    \inputundergraduate{}
}
{
    \inputgraduate{}
}
\end{document}
